package com.xiongwei.mediator;

/**
 * 抽象同事类，不同的实现类，完成各自的职责
 * @author XiongWei
 * @date 2024/2/1
 */
public abstract class AbstractColleage {

    private Mediator mediator;
    public String name;

    /**
     * 通过构造方法将中介类实例化到同事类中
     * @param mediator
     * @param name
     */
    public AbstractColleage(Mediator mediator, String name) {
        this.mediator = mediator;
        this.name = name;
    }

    public Mediator getMediator() {
        return this.mediator;
    }

    public abstract void sendMessage(int stateChange);

    public void getMessage() {

    }




}
